package com.raining.inningz.ui.play;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.DatePicker;
import android.widget.EditText;


import com.raining.inningz.R;
import com.raining.inningz.baseclass.BaseFragment;
import com.raining.inningz.constants.IFragmentNameConstants;
import com.raining.inningz.constants.IParamConstants;
import com.raining.inningz.custom.validator.Form;
import com.raining.inningz.custom.validator.Validate;
import com.raining.inningz.custom.validator.customValidator.CommonErrMsgValidator;
import com.raining.inningz.custom.validator.validator.NotEmptyValidator;
import com.raining.inningz.database.dao.Matches;
import com.raining.inningz.database.dao.MatchesDao.Properties;
import com.raining.inningz.manager.NotifyManager;
import com.raining.inningz.utils.Utils;

public class PlayScorecardFragment extends BaseFragment implements
		OnClickListener {

	private LayoutInflater mInflater;
	private View view;

	

	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		if(getArguments()!=null){
			
		
		matchID=getArguments().getString(IParamConstants.MATCH_ID);
		
		isEdit=getArguments().getBoolean(IParamConstants.IS_EDIT);
		}
		
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		mInflater = inflater;

		view = inflater.inflate(R.layout.fragment_play_scorecard, container,
				false);
		context = mInflater.getContext();

		initialiseUI();

		setListner();
		
		setData();

		return view;
	}
	
	private void setData() {
		
		
		
	}

	

	private void initialiseUI() {

		setHeaderIntialize(view);
		setLeftReturn();
		setLeftTextSelector(resources.getColor(R.color.top_bar_Button),
				resources.getColor(R.color.top_bar_Button_press), "InningZ");
		setRightTextSelector(resources.getColor(R.color.top_bar_Button),
				resources.getColor(R.color.top_bar_Button_press), "Save");
		setHeaderTitle(resources.getString(R.string.about), Color.BLACK);

	
		
	}

	private void setListner() {

		getBtnLeft().setOnClickListener(this);
		getBtnRight().setOnClickListener(this);
		
	}

	@Override
	public void onClick(View v) {

		if (v == getBtnLeft()) {
			fragmentManager.popBackStack();
		} else if (v == getBtnRight()) {

			


		}
		

	}


}
